package top.wilsonlv.jaguar.cloud.auth.sdk.spi;

import top.wilsonlv.jaguar.commons.web.response.JsonResult;
import top.wilsonlv.jaguar.security.model.SecurityUser;

/**
 * @author lvws
 * @since 2021/12/28
 */
public interface SecurityUserService {

    /**
     * 根据用户名查询用户
     *
     * @param username 用户名
     * @return 用户
     */
    JsonResult<SecurityUser> loadUserByUsername(String username);

    /**
     * 根据设备签名认证用户
     *
     * @param deviceUid 设备UID
     * @param userId    用户ID
     * @return 用户
     */
    JsonResult<SecurityUser[]> loadUsersByDeviceUid(String deviceUid, Long userId);

}
